package stardust.product.platform.persistence.sql;


import stardust.product.platform.persistence.JdbcHelper;
import stardust.product.platform.persistence.PersistenceException;


public interface SQLFactory
{

	String getName();
	
	String getVersion();
	
	String beginTransaction(String name) throws PersistenceException;
	
	String commitTransaction(String name) throws PersistenceException;
	
	String rollbackTransaction(String name) throws PersistenceException;
	
	String insert(String tableName, String[] column) throws PersistenceException;
	Long lastInsertId(JdbcHelper jdbcHelper, String sequence) throws PersistenceException;
	
	String update(String tableName, String[] column, String primaryKey) throws PersistenceException;
	
	String delete(String tableName, String primaryKey) throws PersistenceException;
	
	String select(String tableName, String column, String primaryKey, int argc) throws PersistenceException;
	
	String selectPage(String sql, int begin, int end) throws PersistenceException;
	
}
